package at.ac.tuwien.infosys.aic11.legacy;

import java.util.logging.Logger;

import at.ac.tuwien.infosys.aic11.dto.Address;
import at.ac.tuwien.infosys.aic11.dto.Offer;


public class ShippingMock {
	
	private static Logger log = Logger.getLogger("ShippingMock");
	private long sentAt=0;
	private long waitingTime=0;

	public void shipContract(Address a, Offer o){
		log.info("shipping contract to customer");
		waitingTime= 10000;
		log.info("contrac comes back in "+waitingTime+" milliseconds");
		sentAt = System.currentTimeMillis();
	
	}
	
	public void sendMail(){
		log.info("sending mail to customer");
	}
	
	public boolean gotContractBack(){
		long now = System.currentTimeMillis();
		if((now-sentAt)>=10000){
			return true;
		}
		return false;
	}

}
